package com.briup.day31;

public class WindowRunnable implements Runnable {
	
	private int ticket = 100;

	@Override
	public void run() {
		while (ticket > 0) {
			synchronized (Object.class) {
				System.out.println(Thread.currentThread().getName()
						+"完成一次售票，余票"+--ticket);
				
			}
			
		}

	}

}
